<script language="javascript" src="<?php echo base_url(); ?>application/views/hospitalizacion/js/hospitalizacion.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>media/jquery/jquery.min.js"></script>
<form class="form-horizontal well">
    
    <legend>Asignación de habitaciones Hospitalización</legend>
        <!--<div id="acordion2" class="collapse on">-->
        <div>
            <!--MENSAJE DE CONTROL--->
            <div id="mensajeControl" style="display: none">
                <button type="button" class="close" data-dismiss="alert">×</button>
            </div>
            <legend>Detalle</legend>
            <div class="row-fluid">
                <div class="span6">
                    <div class="control-group">
                        <label class="control-label" for="numOrden"><strong>N° Cita</strong></label>
                        <div class="controls"><input type="text" disabled class="input-xlarge" id="numOrden" value=<?php echo $datosCita[0]['Orden']?> ></div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="nombres"><strong>Nombres</strong></label>
                        <div class="controls"><input type="text" disabled class="input-xlarge" id="nombres" value=<?php echo $datosCita[0]['Nombres']?> ></div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="especialidad"><strong>Especialidad</strong></label>
                        <div class="controls"><input type="text" disabled class="input-xlarge" id="especialidad" value=<?php echo $datosCita[0]['Especialidad']?>></div>
                    </div>
                </div>
                <div class="span6">
                    <div class="control-group">
                        <label class="control-label" for="doctor"><strong>Doctor</strong></label>
                        <div class="controls"><input type="text" disabled class="input-large" id="doctor" value=<?php echo $datosCita[0]['codDoctor']?>></div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="fechaIni"><strong>Fecha órden</strong></label>
                        <div class="controls"><input type="text" disabled class="input-large" id="fechaIni" value=<?php echo $datosCita[0]['FechaOrden']?>></div>
                    </div>
                    <div class="row-fluid">
                        <label class="control-label" for="cama"><strong>Id Cama</strong></label>
                        <div class="controls">
                            <input type="text" disabled class="input-small" id="cama">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#myModal" role="button" class="btn btn-success" data-toggle="modal" onclick="limpiarDatosModal()"><strong>Cama</strong></a>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="controls"><input type="hidden" id="fila" value="1"></div>
                    </div>
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
                    <div class="form-actions">
                        <a class="btn btn-primary" onclick="insertarConsulta_Cama()" > Asignar Cama</a>                    
                    </div>
                </div>
            </div>
        </div>
        <div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none;width:700px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">Seleccionar Cama</h3>
            </div>
            <div class="modal-body" style="height:550px;">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="control-group"></div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span2">
                    </div>
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label"><strong>Ambiente</strong></label>
                            <div class="controls">
                                <?php  
                                    $js = ' id=ambiente1 class ="input-large chzn-select" onchange="ambi1()"';
                                    echo form_dropdown('ambiente1', $comboAmbiente, NULL, $js); 
                                ?>
                            </div>
                        </div>
                        <div class="control-group" id="sitio1">
                            
                        </div>
                        <div class="control-group" id="sitio2">
                            
                        </div>
                    </div>
                    <div class="span4">
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <div class="control-group"></div>
                    </div>
                    <div class="span8">
                        <a class="btn btn-primary center" onclick="asignarCama()" data-dismiss="modal" aria-hidden="true"> Asignar Cama</a>
                    </div>
                </div>
            </div>
        </div>
</form>

<style type="text/css">
.tr_hover_color {background-color: #ffccee}
.tr_hover_nothing {background-color: white}
</style>